﻿using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using IdentityServer4.Models;

namespace K9Nano.Admin.Identity
{
    public interface IApiScopeAppService
    {
        ValueTask<IReadOnlyList<ApiScope>> GetAllAsync(CancellationToken cancellation);
        ValueTask<ApiScope> GetByNameAsync(string name, CancellationToken cancellation);
        ValueTask AddOrUpdateAsync(ApiScope scope, CancellationToken cancellation);
        ValueTask DeleteAsync(string name, CancellationToken cancellation);
        ValueTask SetEnableAsync(string name, bool enable, CancellationToken cancellation);
    }
}